// 排行
const app = getApp();
var common = require("../../common.js")
Page({
  /**
   * 页面的初始数据
   */
  data: {
    list:[],
     mine: null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
	wx.showLoading({title:'正在获取数据'})
    common.request({
      url: 'c=Game&a=starRank',
      success: function (e) {
        console.log(e);
        that.setData({
          list: e.list,
          minerank: e.rank,
          minetitle: e.title,
        });       
        app.globalData.rank = e.rank;
        app.globalData.title = e.title;
      },
	  complete:function(){
		  wx.hideLoading();
	  },
      method: "POST"
    });
  },

  onShow:function(){
    this.setData({      
        'mineicon': app.globalData.userInfo.avatarUrl,
        'minename': app.globalData.nickname,
        'minescore': app.globalData.historyScore      
    });
    console.log(app.globalData);
  },


  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

})